import { request } from '@/framework/utils/request-jdz';

export const taskSearch = (params) => {
  return request(
    {
      url: '/projects',
      method: 'get',
      params,
    },
    {
      isGetDataDirectly: false,
    },
  );
};

export const taskDelete = (id) => {
  return request(
    {
      url: `/projects/${id}`,
      method: 'delete',
    },
    {
      isGetDataDirectly: false,
    },
  );
};

export const taskAdd = (params) => {
  return request(
    {
      url: '/projects',
      method: 'post',
      data: params,
    },
    {
      isGetDataDirectly: false,
    },
  );
};

export const taskUpdate = (id, params) => {
  return request(
    {
      url: `/projects/${id}`,
      method: 'put',
      data: params,
    },
    {
      isGetDataDirectly: false,
    },
  );
};
